package part18.test;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

/**
 * @author wcj
 * @Date 2021/6/4 18:05
 * @Version 1.0
 */
public class SerializableObject {

 /**
  * 序列化对象写入一个文件
  *
  * @param args
  * @throws IOException
  */
 public static void main(String[] args) throws IOException {
  ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream("./src/part18/test/serializableObject.file"));
  ObjectSerializable objectSerializable = new ObjectSerializable();
  out.writeObject(objectSerializable);
 }
}
